﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProjectEulerSolutions
{
    class Problem2
    {
        public static string Calculate()
        {
            int limit = 4000000;

            int sum = 0;

            int prev = 1;
            int next = 2;

            while (next < limit)
            {
                int temp = prev;
                prev = next;
                if(next % 2 == 0)
                    sum += next;
                next = temp + next;
            }

            return sum.ToString();
        }
    }
}
